addHook("LinedefExecute", function(line, mo, sector)
	if mo.type == MT_PLAYER
		if mo and mo.player 
			//These players should be affected by radiation.
			if not mo.player.powers[pw_flashing] and not mo.player.powers[pw_super] and not mo.player.powers[pw_invulnerability] and mo.player.powers[pw_shield] != SH_ARMAGEDDON
				if FixedInt(line.frontside.textureoffset) > 0
					//Countdown subtraction rings.
					if mo.player.timeoutaward == nil
						//Countdown is Y offset frontside of linedef execute.
						if FixedInt(line.frontside.rowoffset) > 0
							mo.player.timeoutaward = FixedInt(line.frontside.rowoffset)
						else
							mo.player.timeoutaward = 0
						end
					end
					if mo.player.timeoutaward != 0
						mo.player.timeoutaward = $ - 1
					else
						//Subtraction of player's rings.
						if mo.player.rings > 0
							S_StartSound(mo, sfx_antiri)
							//Subtraction rings is X offset frontside of linedef execute.
							mo.player.rings = $ - FixedInt(line.frontside.textureoffset)
							if FixedInt(line.frontside.rowoffset) > 0
								mo.player.timeoutaward = FixedInt(line.frontside.rowoffset)
							end
						else
							//Player dies if he has no rings.
							P_KillMobj(mo)
							//Message of death.
							if G_RingSlingerGametype()
								print(mo.player.name.." couldn't survive the radiation.")
							end
						end
					end
				end
			end
		end
	end
end, "RADIATION")
